1. Field of the Invention
The present invention relates to a gateway system, and more particularly to a technique for controlling multi-channel voice data of a gateway system between a public switched telephone network (PSTN) and an internet network.
2. Description of the Conventional Art
Recently, as a voice communication terminal based on an internet protocol IP such as internet phone has been activated, development of a gateway system enabling a voice communication between the IP network and the PSTN is under way. In general, such gateway system includes a call control conversion part and a voice data conversion part, of which the voice data conversion part is a critical element for a high performance and efficiency in view that it should be processed at a high speed for real time.
That is, since interfacing is performed between each protocol hierarchy, when the data is given and taken between each protocol hierarchy, a standardized protocol should be first processed, and the efficiency of the voice communication depends on how to control the voice data.
FIG. 1 is a schematic view of the standardized voice process protocol structure of a general gateway system in accordance with a conventional art.
An analog audio signal received through a PSTN interface 101 from the PSTN network is converted to a digital voice data by an audio CODEC 102. A multi-channel packet controller 103 packetizes a plurality of digital voice data. A real-time protocol/real-time transmission control protocol (RTPIRTCP) unit 104 adds an RTP header to the packetized digital voice data, and a user datagram protocol/internet protocol (UDP) unit 105 adds a UDP header thereto to output it. The packetized digital voice data to which the UDP header is added is transmitted to a LAN or to an internet network via a local area network (LAN) interface 106.
Meanwhile, a process for transmitting the packetized digital voice data from the LAN or the internet network to the PSTN is carried out in the reverse order to the above process.
FIG. 2 shows data formats to be processed at each units of FIG. 1, which refers to a voice data formats between each protocol interface in the general gateway system in accordance with the conventional art.
When the digital voice data converted in the audio CODEC 102 is counted to a predetermined number, the multi-channel packet controller 103 packetizes them by a single packet to generate a RTP data, an RTP/RTCP unit 104 adds an RTP header to the RTP data to generate a UDP data, and the UDP unit 105 adds a UDP header to the UDP data.
Reversely, when the packetized digital voice data (UDP data) is inputted from the LAN or the internet network, the UDP unit 105 removes the UDP header from the UDP data to generate a RTP data, and the RTP/RTCP unit 104 removes the RTP header from the RTP data to generate a voice packet. The multi-channel packet controller 103 generates analog audio signals corresponding to each voice data from the voice packet and transmits them to the PSTN network. In this respect, the RTP header carries a control information for controlling the RTP data.
The above process is performed for a single channel, which is to be performed for several channels at real time, in which a single PSTN channel is mapped with a single channel of the UDP unit.
In case of an interrupt event drive method, an overhead of an interrupt service switching time or a task switching time for each channel and each packet is very critical.
That is, assuming that a packetizing period is 30 ms and the number of the channel is N, when an audio signal is received from the PSTN, an interrupt service switching should occur N times at maximum within 30 ms of packetizing period and N times of task switching should occur. Namely, every time the interrupt signal is generated at each channel, the interrupt service switching and the task switching should occur.
In detail, when the interrupt service switching occurs once, for a single channel, the RTP header and the UDP header are added to the packet data provided from the multi-channel packet controller and then transmitted to the internet network or LAN, which is to be performed N times.
In addition, for the events in the reverse direction, that is, when the packetized digital voice data is inputted from the internet network, the similar process should be done.
In this respect, however, if the plurality of events are not processed within 30 ms of the pecketizing period, the system efficiency is much deteriorated due to the switching overhead. Accordingly, in order to manage the system stably, the number of the channels to be processed by the system is inevitably limited due to the switching overhead.
Accordingly, an object of the present invention is to provide a method for controlling multi-channel voice data of a gateway system and its apparatus which is capable of reducing the time to be taken for processing voice data between a PSTN and an internet protocol terminal.
To achieve these and other advantages and in accordance with the purpose of the present invention, as embodied and broadly described herein, there is provided a method for controlling multi-channel voice data of a gateway system and its apparatus in which an interrupt event is posted once during a packetizing period to perform a RTP/multi-packet controller driver applied program task, and a memory region of a buffer is divided by voice packet units and a RTP header is statically allocated to each memory region by which RTP data corresponding to N number of channels are processed as a whole when an interrupt signal is generated.
Also, there is provided a method for controlling multi-channel voice data of a gateway system including the steps of: allocating statically a plurality of memory regions of a channel buffer; storing a RTP header at each allocated memory region; copying sequentially a plurality of voice packets received from a multi-channel packet controller on each memory region to produce a plurality of UDP data; and sequentially transmitting the plurality of UDP data to a UDP unit when an interrupt signal is generated.